package cn.bigfire.wedesk.net.fivesocket.frame;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

public class PingFiveFrame extends AbsFiveFrame {

    /**
     * Creates a new empty ping frame.
     */
    public PingFiveFrame() {
        super(true, 0, Unpooled.buffer(0));
    }

    /**
     * Creates a new ping frame with the specified binary data.
     *
     * @param binaryData
     *            the content of the frame.
     */
    public PingFiveFrame(ByteBuf binaryData) {
        super(binaryData);
    }

    /**
     * Creates a new ping frame with the specified binary data.
     *
     * @param finalFragment
     *            flag indicating if this frame is the final fragment
     * @param rsv
     *            reserved bits used for protocol extensions
     * @param binaryData
     *            the content of the frame.
     */
    public PingFiveFrame(boolean finalFragment, int rsv, ByteBuf binaryData) {
        super(finalFragment, rsv, binaryData);
    }

    @Override
    public PingFiveFrame copy() {
        return (PingFiveFrame) super.copy();
    }

    @Override
    public PingFiveFrame duplicate() {
        return (PingFiveFrame) super.duplicate();
    }

    @Override
    public PingFiveFrame retainedDuplicate() {
        return (PingFiveFrame) super.retainedDuplicate();
    }

    @Override
    public PingFiveFrame replace(ByteBuf content) {
        return new PingFiveFrame(isFinalFragment(), rsv(), content);
    }

    @Override
    public PingFiveFrame retain() {
        super.retain();
        return this;
    }

    @Override
    public PingFiveFrame retain(int increment) {
        super.retain(increment);
        return this;
    }

    @Override
    public PingFiveFrame touch() {
        super.touch();
        return this;
    }

    @Override
    public PingFiveFrame touch(Object hint) {
        super.touch(hint);
        return this;
    }
}
